package cloud.daodao.storm.file.controller;

import cloud.daodao.storm.file.service.FileService;
import cloud.daodao.storm.common.file.api.FileApi;
import cloud.daodao.storm.common.file.model.FileData;
import cloud.daodao.storm.common.file.model.FileParam;
import cloud.daodao.storm.common.model.Request;
import cloud.daodao.storm.common.model.Response;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DaoDao
 */
@RestController
public class ApiController implements FileApi {

    @Resource
    private FileService fileService;

    @Override
    public Response<FileData> info(Request<FileParam> request) {
        FileData data = fileService.info(request.getParam());
        return new Response<>(data);
    }

}
